import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'

const serviceName = '/sjsk-alarm-service'
/*-----------关键词配置-----------*/
//获取关键词列表
const getKeywordList = (params) => getAction(`${serviceName}/keyword/getList`, params)
//获取关键词详情(编辑调取数据)
const getKeywordDetails = (id) => getAction(`${serviceName}/keyword/get/${id}`)
//添加关键词
const addKeyword = (params) => postAction(`${serviceName}/keyword/add`, params)
//编辑关键词
const updateKeyword = (params) => putAction(`${serviceName}/keyword/update`, params)
//停用、启用操作
const enableKeyword = (params) => putAction(`${serviceName}/keyword/enable`, params)

/*-----------模型配置-----------*/
//添加行为管控模型配置模型
const addBehaviorControlModelConfig = (params) => postAction(`${serviceName}/modelConfig/addBehaviorControlModelConfig`, params)
//添加情报挖掘模型配置
const addInformationMiningModelConfig = (params) => postAction(`${serviceName}/modelConfig/addInformationMiningModelConfig`, params)
//获取模型配置
const getModelConfig = (typeId) => getAction(`${serviceName}/modelConfig/getModelConfig/${typeId}`)

/*-----------告警事件-----------*/
//查询告警事件列表
const getTaskList = (params) => getAction(`${serviceName}/task/queryList`, params)
//处置
const taskDisposal = (params) => postAction(`${serviceName}/task/dispose`, params)
//查看处置结果
const getTaskDetails = (id) => getAction(`${serviceName}/task/dispose/${id}`)
//查看任务的目标对象
const getTargetObject = (id) => getAction(`${serviceName}/task/queryTargetObject/${id}`)
//关闭
const taskClose = (id) => deleteAction(`${serviceName}/task/close/${id}`)
//获取任务模型
const taskQueryModel = (params) => getAction(`${serviceName}/task/queryModel`, params)
//查看详情
const taskDetails = (id) => getAction(`${serviceName}/task/details/${id}`)
//查看详情-任务模型
const taskModelDetails = (id) => getAction(`${serviceName}/task/modelDetails/${id}`)
//查看详情-目标对象
const taskUserDetails = (params) => getAction(`${serviceName}/task/userDetails`, params)

/*-----------情报中心-----------*/
//情报中心列表
const getInformationList = (params) => getAction(`${serviceName}/information/queryList`, params)
//处置
const informationDisposal = (params) => postAction(`${serviceName}/information/disposal`, params)
//查看处置结果
const getDisposalDetails = (id) => getAction(`${serviceName}/information/disposal/${id}`)
//查看情报通联信息
const getInformationRecord = (params) => getAction(`${serviceName}/information/queryRecord`, params)
//查看情报基本信息
const getInformationRecordInfo = (params) => getAction(`${serviceName}/information/queryRecordInfo`, params)
//查看通话详情
const getInformationCallInfo = (params) => getAction(`${serviceName}/information/queryCallInfo`, params)
//查看通话详情统计图
const getInformationCallPicture = (params) => getAction(`${serviceName}/information/queryCallPicture`, params)
//导出情报中心列表
const informationExport = (params) => downFile(`${serviceName}/information/exportListData`, params, 'post')

/*-----------告警中心-----------*/
//查询告警中心列表
const getAlarmCenterList = (params) => getAction(`${serviceName}/alarm-center/queryList`, params)
//查看对应区域的具体数据占比
const getDataDisplay = (id) => getAction(`${serviceName}/alarm-center/dataDisplay/${id}`)
//导出情报中心列表
const alarmCenterExport = (params) => downFile(`${serviceName}/alarm-center/exportList`, params, 'post')
//查看处置
const getAnagement = (id) => postAction(`${serviceName}/alarm-center/anagement/${id}`)
//处置
const alarmCenterDisposal = (params) => postAction(`${serviceName}/alarm-center/dispose`, params)
//获取对应告警消息的人员
const getQuery = (id) => getAction(`${serviceName}/alarm-center/query/${id}`)
//获取告警消息详情(通用)
const getAlarmDetails = (id) => getAction(`${serviceName}/alarmDetails/alarmDetails/${id}`)
//获取告警消息详情(异常资金来往)
const getAlarmCapitalDetails = (id) => getAction(`${serviceName}alarmDetails/alarmCapitalDetails/${id}`)
//获取打卡记录
const getPunchRecord = (params) => getAction(`${serviceName}/alarmDetails/getPunchRecord`, params)

/*-----------精准管控一张图-----------*/
//精准管控列表
const getPreciseList = (params) => getAction(`${serviceName}/precise/list`, params)

/*-----------区域管理-----------*/
//查询区域列表
const getRegionList = (params) => getAction(`${serviceName}/region/queryList`, params)
//获取区域详情
const getDetailsById = (id) => getAction(`${serviceName}/region/getDetailsById/${id}`)
//创建区域(框选)
const createRegion = (params) => postAction(`${serviceName}/region/create`, params)
//更新重点区域(框选)
const updateRegion = (params) => putAction(`${serviceName}/region/updateByFrame`, params)
//停用、启用操作
const enableRegion = (params) => putAction(`${serviceName}/region/operation`, params)
//删除
const deleteRegion = (params) => deleteAction(`${serviceName}/region/delete`, params, 'post')

/*-----------任务模型管理-----------*/
//任务模型管理-人物画像查询
//用户列表
const getPortraitUserList = (params) => getAction(`${serviceName}/portrait/queryUserList`, params)
//虚拟身份
const getPortraitVirtualIdentity = (params) => getAction(`${serviceName}/portrait/queryVirtualIdentity`, params)
//通联记录
const getPortraitCommonRecord = (params) => getAction(`${serviceName}/portrait/queryCommonRecord`, params)
//通联关系图
const getPortraitCommonRecordDiagram = (params) => getAction(`${serviceName}/portrait/queryCommonRecordDiagram`, params)
//职住区域
const getPortraitWorkingLivingArea = (params) => getAction(`${serviceName}/portrait/queryWorkingLivingArea`, params)
//三码互查
const getPortraitThreeCodeMutualCheck = (params) => getAction(`${serviceName}/portrait/queryThreeCodeMutualCheck`, params)

//任务模型管理-通信行为查询
//通讯行为列表
const getCommonRecordList = (params) => getAction(`${serviceName}/taskCommonRecord/queryList`, params)
//查询通讯记录
const getCommonRecordRecord = (params) => getAction(`${serviceName}/taskCommonRecord/queryRecord`, params)
//查询通讯关系图
const getCommonRecordRecordDiagram = (params) => getAction(`${serviceName}/taskCommonRecord/queryRecordDiagram`, params)

//任务模型管理-团伙关系查询
//目标列表
const getGangRelationsList = (params) => getAction(`${serviceName}/gangRelations/query`, params)
//目标列表详情
const getGangRelationsDetails = (params) => getAction(`${serviceName}/gangRelations/queryDetails`, params)
//内部分析
const getGangRelationsInsideAnalysis = (params) => getAction(`${serviceName}/gangRelations/insideAnalysis`, params)
//外部挖掘
const getGangRelationsExternal = (params) => getAction(`${serviceName}/gangRelations/external`, params)
//获取阈值
const getThreshold = (params) => postAction(`${serviceName}/gangRelations/getThreshold`, params)
//设置阈值
const setThreshold = (params) => postAction(`${serviceName}/gangRelations/setThreshold`, params)

//任务模型管理-历史轨迹、最新位置
const getTrajectoryList = (params) => getAction(`${serviceName}/trajectory/queryTrajectory`, params)

export {
  getKeywordList,
  getKeywordDetails,
  addKeyword,
  updateKeyword,
  enableKeyword,
  addBehaviorControlModelConfig,
  addInformationMiningModelConfig,
  getModelConfig,
  getTaskList,
  taskDisposal,
  getTaskDetails,
  getTargetObject,
  taskClose,
  taskQueryModel,
  taskDetails,
  taskModelDetails,
  taskUserDetails,
  getInformationList,
  informationDisposal,
  getDisposalDetails,
  getInformationRecord,
  getInformationRecordInfo,
  getInformationCallInfo,
  getInformationCallPicture,
  informationExport,
  getAlarmCenterList,
  getDataDisplay,
  alarmCenterExport,
  getAnagement,
  alarmCenterDisposal,
  getQuery,
  getAlarmDetails,
  getAlarmCapitalDetails,
  getPunchRecord,
  getPreciseList,
  getRegionList,
  getDetailsById,
  createRegion,
  updateRegion,
  enableRegion,
  deleteRegion,
  getPortraitUserList,
  getPortraitVirtualIdentity,
  getPortraitCommonRecord,
  getPortraitCommonRecordDiagram,
  getPortraitWorkingLivingArea,
  getPortraitThreeCodeMutualCheck,
  getCommonRecordList,
  getCommonRecordRecord,
  getCommonRecordRecordDiagram,
  getGangRelationsList,
  getGangRelationsDetails,
  getGangRelationsInsideAnalysis,
  getGangRelationsExternal,
  getThreshold,
  setThreshold,
  getTrajectoryList
}
